package com.woniu.utils;

import org.apache.shiro.crypto.hash.Md5Hash;

/**
 * 加密工具类
 *
 * @author WenXin
 * @version 1.0
 * @description: TODO
 * @date 2022/9/8 15:13
 */
public class SecurityCryUtils {
    private static final String SALT_VALUE = "woniuxy";

    public static String automaticallyGeneratePassword(String username, String passwrod) {
        //初始化用户密码 123456  Hash算法都是非对称加密(不能解密)  提到外面去！
        Md5Hash md5Hash = new Md5Hash(passwrod, username + passwrod + SALT_VALUE);
        return md5Hash.toString();
    }
}
